package ar.edu.unlu.sistemas.movirdroid.business.util;

import java.util.Comparator;

import ar.edu.unlu.sistemas.movirdroid.business.vo.DocumentVO;

public class DocumentComparator implements Comparator<DocumentVO> {
	
	public int compare(DocumentVO d1, DocumentVO d2) {
		if (d1.getName() != null) {
			return d1.getName().compareTo(d2.getName());
		} else if (d2.getName() != null) {
			return -d2.getName().compareTo(d1.getName());
		} else {
			return 0;
		}
	}

}
